package spring.cloud.controller.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

/**
 * Created with IntelliJ IDEA.
 * User: jiangfei
 * Date: 16-11-2
 * Time: 下午7:34
 * To chnge this template use File | Settings | File Templates.
 */
@FeignClient("spring-cloud-service")
public interface HelloFeignClient {
//    @GET
//    @Path("/hello/hello_server")
//    @Consumes(MediaType.APPLICATION_JSON)
//    @Produces(MediaType.APPLICATION_JSON)
@RequestMapping(method = RequestMethod.GET, value = "/hello/hello_server",
        produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
    ResponseEntity<String> hello_say(@RequestParam("owner") String owner);
}
